<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【物品信息】')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-item-edit" th:object="${item}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">RFID编号：</label>
                <div class="col-sm-8">
                    <input name="RFIDNO" th:field="*{RFIDNO}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">物品分类：</label>
                <div class="col-sm-8">
                    <input name="itemType"  th:field="*{itemType}"  class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物品名称：</label>
                <div class="col-sm-8">
                    <input name="itemName" th:field="*{itemName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">物品品牌：</label>
                <div class="col-sm-8">
                    <input name="itemBrand" th:field="*{itemBrand}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">规格型号：</label>
                <div class="col-sm-8">
                    <input name="itemStandard" th:field="*{itemStandard}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">序列号：</label>
                <div class="col-sm-8">
                    <input name="serialNumber" th:field="*{serialNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">采购日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="stockDate" th:value="${#dates.format(item.stockDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">责任部门：</label>
                <div class="col-sm-8">
                    <input name="responsibleDept" th:field="*{responsibleDept}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">责任人：</label>
                <div class="col-sm-8">
                    <input name="responsibleEmp" th:field="*{responsibleEmp}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用部门：</label>
                <div class="col-sm-8">
                    <input name="useDept" th:field="*{useDept}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用人：</label>
                <div class="col-sm-8">
                    <input name="useEmp" th:field="*{useEmp}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">供货商：</label>
                <div class="col-sm-8">
                    <input name="provider" th:field="*{provider}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">存放位置：</label>
                <div class="col-sm-8">
                    <input name="storageLocation" th:field="*{storageLocation}" class="form-control" type="text">
                </div>
            </div>
          <!--  <div class="form-group">
                <label class="col-sm-3 control-label">物品状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box">
                        <input type="radio" name="status" value="">
                        <label th:for="status" th:text="未知"></label>
                    </div>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/item";
        $("#form-item-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-item-edit').serialize());
            }
        }

        $("input[name='stockDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>